<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" 
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4" 
      lang="cn">
  <head>
    <meta charset="UTF-8">
    <title>案例管理</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    
     <link rel="shortcut icon" th:href="@{/favicon.ico}" type="image/x-icon" />
     <link rel="stylesheet" th:href="@{/jstree/themes/default/style.min.css}" />
    <link rel="stylesheet" th:href="@{/css/font-awesome.min.css}">
	<link rel="stylesheet" th:href="@{/css/xadmin.css}">
	<script type="text/javascript" th:src="@{/js/jquery.min.js}"></script>
    <script type="text/javascript" th:src="@{/layui/layui.js}" charset="utf-8"></script>
    <script type="text/javascript" th:src="@{/js/xadmin.js}"></script>
    <script type="text/javascript" th:src="@{/js/common.js}"></script>
	<script type="text/javascript" th:src="@{/sortable/Sortable.min.js}"></script>
	<script type="text/javascript" th:src="@{/js/case-add.js}"></script>
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
       <script th:src="@{/js/html5shiv.min.js}"></script>
      <script th:src="@{/js/respond.min.js}"></script>
    <![endif]-->
    <style>
     .layui-input{height:30px;}
    </style>
  </head>
  
   <body>
   <input type="hidden" id="caseId" th:attr="value=${caseId}"/>
    <div class="x-body">
  <div class="layui-form">
  
     <div class="layui-form-item">
              <label for="appId" class="layui-form-label">应用平台</label>
              <div class="layui-input-block">
                 <select id="appId" lay-filter="appId"><option th:each="obj,iterStat:${applist}" th:attr="value=${obj.id}" th:text="${obj.appName}+'('+${obj.appType == 1?'ANDROID':'IOS'}+')'"></option></select>
              </div>
     </div>
     <div class="layui-form-item">
              <label for="caseName" class="layui-form-label" >
                  <span class="x-red">*</span>案例名称
              </label>
              <div class="layui-input-block">
                  <input type="text" id="caseName" autocomplete="off" class="layui-input" maxlength="15">
              </div>
	</div>
    <div class="layui-form-item">
              <label for="caseType" class="layui-form-label">
                  案例类型
              </label>
              <div class="layui-input-block">
                 <select id="caseType">
				    <option value="1">正面</option>
					<option value="2">反面</option>
				 </select>
              </div>
    </div>
    <div class="layui-form-item">
              <label for="caseStatus" class="layui-form-label">
                  案例状态
              </label>
              <div class="layui-input-block">
                 <select id="caseStatus">
				    <option value="1">有效</option>
					<option value="2">无效</option>
				 </select>
              </div>
    </div>
   <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
		<legend>案例步骤</legend>
   </fieldset>
   <xblock>
        <button class="layui-btn"  id="add-btn"><i class="layui-icon">&#xe654;</i>新增</button>
        <button class="layui-btn"  id="imp-btn"><i class="layui-icon">&#xe654;</i>引入</button>
	    <button class="layui-btn layui-btn-normal" onclick="delStep()"><i class="layui-icon">&#xe640;</i>删除</button>
        <button class="layui-btn layui-btn-normal" id="act-btn"><i class="layui-icon">&#xe634;</i>演示</button>
      </xblock>

  <table class="layui-table"  lay-filter="test3">
  <thead>
    <tr>
	  <th style="width:5%">&nbsp;</th>
     
      <th>操作动作</th>
      <th>操作控件</th>
      <th>操作数据</th>
      <th>操作延迟(秒)</th>
      <th>期望动作</th>
      <th>期望结果</th>
    </tr>
  </thead>
  <tbody id="dg">
    <tr>
	 <td><input type="checkbox"  name="checkbox" lay-skin="primary"/></td>
	 <td>
	     <select lay-filter="operate-input" name = "operateType">
		    <option value="1">点击</option>
			<option value="2">长按</option>
			<option value="3">输入</option>
			<option value="4">读取</option>
			<option value="5">滚动区域搜索</option>
			<option value="6">内容匹配点击</option>
			<option value="7">图片匹配点击</option>
		</select>
	</td>
	 <td><input type="hidden" name="operateControlId"/><input type="text" class="layui-input" name="control-input-name" onclick="selectCtrl(this)" readonly/></td>
	 <td><input type="hidden" name="operateData"/><input type="hidden" name="operateRule"/><input type="text" class="layui-input" name="data-input" onclick="selectData(this)" readonly/></td>
	 <td><input type="text" class="layui-input" name="waitingSecs"/></td>
	 <td>
	    <select lay-filter="expect-output" name="expectType">
		  <option value="1">无</option>
		  <option value="2">文本内容包含</option>
		  <option value="3">发现控件</option>
		  <option value="4">变量运算</option>
		</select>
		</td>
	 <td><input type="hidden" name="outputData"/><input type="text" class="layui-input" name="data-output" onclick="selExpect(this)" readonly /></td>
	</tr>
  </tbody>
</table>
<div class="layui-form-item" style="text-align:center;margin-top:10px;">
			<button id="save-btn"  class="layui-btn"  type="button">
			 <i class="fa fa-floppy-o" style="margin-right:10px;"></i>确定
			</button>
  </div>
</div>
</div>        
</body>
</html>